#ifndef __SPI_DRIVER_H__
#define __SPI_DRIVER_H__
#include "drv_config.h"

#define MAX_BUS_NUM     3

enum BUSNUM {
    SPI1 = 0,
    SPI2,
    SPI3,
    SPI_NONE,
};


struct spi_client
{

    uint8_t bus_num;
    uint8_t is_init;
    #ifdef ESP32
    spi_dma_chan_t chan;
    spi_bus_config_t buscfg;
    #endif
    /* data */
};

#ifdef ESP32
int SpiMasterInit();
#endif
#endif